<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemGroupPermissions extends \App\Utils\CreateMigration
{
    function columns(Blueprint $table)
    {
        $table->unsignedBigInteger('group_id')->default(0)->comment('分组编号');
        $table->string('permission_code')->default('')->comment('权限编码');
        $table->unique([ 'permission_code', 'group_id','deleted_at'], 'unique_deleted_group_permission');
    }

    function tableInfo()
    {
        return ['system__group_permissions', '系统-分组权限管理'];
    }
}
